#include "game.h"

void game()
{
  char mine[ROWS][COLS];
  char show[ROWS][COLS];
  Menu();
  InitBoard(mine, ROWS, COLS, '0');
  InitBoard(show, ROWS, COLS, '*');
  SetMine(mine);
  DisplayBoard(show);
  FindMine(mine, show);

}
void game_test()
{
  size_t chess;
  do 
  {
    Menu();
    printf("请输入 1进入游戏 0退出游戏:>");
    scanf("%lu", &chess);
    switch(chess)
    {
      case 1:
            {
             game();
             break;
            }
      case 0:
           {
             printf("退出游戏\n");
             break;
           }
    default:
           {
             printf("输入非法，请重新输入\n");
             break;
           }

    }
}while(chess);


}

int main()
{
  srand((unsigned int)time(NULL));
  game_test(); 
  return 0;
}
